

<template>
<el-form label-position="left">
  <el-form-item label="是否是字典">
    <el-switch v-model="activeData.network.dict"></el-switch>
  </el-form-item>
  <el-form-item label="字典标识" v-if="activeData.network.dict">
    <el-select v-model="activeData.network.dictType">
      <el-option
        v-for="item in dictList"
        :key="item.dictType"
        :label="item.dictName"
        :value="item.dictType">
      </el-option>

    </el-select>

  </el-form-item>
  <el-form-item label="地址" v-else>
    <el-input v-model="activeData.network.url"></el-input>
  </el-form-item>
</el-form>
</template>
<script>
import {mapState} from "vuex"
import {listType} from "@/api/system/dict/type";
export  default {
  name:"NetWorkConfig",
  computed: {
    ...mapState({
      activeData: state => state.formGen.activeData,
      dictList: state => state.formGen.dictList,
    })
  },
  mounted() {
    this.$store.dispatch("formGen/ADD_DICT")
  }
}
</script>
<style scoped lang="scss">

</style>
